USE[DeltaFlex]
GO
IF(OBJECT_ID('dbo.Logs')IS NOT NULL)
	DROP table dbo.LOGS
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE LOGS(
			IDLOG int NOT NULL,
			SPROCEDURE varchar(1000) NOT NULL,
			SMISSATGE  varchar(1000) NOT NULL,
			DATA date NOT NULL

CONSTRAINT PK_LOG PRIMARY KEY CLUSTERED 
(
	IDLOG  ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

IF (OBJECT_ID('SEQ_LOG')IS NOT NULL)
	DROP SEQUENCE SEQ_LOG
GO

CREATE SEQUENCE SEQ_LOG
	START WITH 1
    INCREMENT BY 1
    MINVALUE 1
    MAXVALUE 9223372036854775807;

GO

